package fr.upstlse.glre.client.controler;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.SuggestOracle;

import fr.upstlse.glre.client.vo.communiquer.BoiteAuxLettresVOGWT;
import fr.upstlse.glre.client.vo.communiquer.MessageVOGWT;
import fr.upstlse.glre.client.vo.user.EtudiantSearchCriteriaVOGWT;
import fr.upstlse.glre.client.vo.user.EtudiantVOGWT;
import fr.upstlse.glre.client.vo.user.ProfesseurVOGWT;
import fr.upstlse.glre.client.vo.user.UserSearchCriteriaVOGWT;
import fr.upstlse.glre.client.vo.user.UserVOGWT;

public interface UserControlerServiceAsync {

	public void login(String pLogin, String pPassword, AsyncCallback<UserVOGWT> pCallback);
	
	public void createUser(UserVOGWT pUserVOGWT, AsyncCallback<Long> pCallback);
	public void updateUser(UserVOGWT pUserVOGWT, AsyncCallback<Object> pCallback);
	public void deleteUser(UserVOGWT pUserVOGWT, AsyncCallback<Object> pCallback);
	public void getUserById(long pUserId, AsyncCallback<UserVOGWT> pCallback);
	public void findByLogin(String pLogin, AsyncCallback<UserVOGWT> pCallback);
	public void findUser(UserSearchCriteriaVOGWT pUserSearchCriteriaVOGWT, AsyncCallback<List<UserVOGWT>> pCallback);
	public void getAllUser(AsyncCallback<List<UserVOGWT>> pCallback);
	
	public void findEtudiant(EtudiantSearchCriteriaVOGWT pEtudiantSearchCriteriaVOGWT, AsyncCallback<List<EtudiantVOGWT>> pCallback);
	public void findEtudiantUser(EtudiantSearchCriteriaVOGWT pEtudiantSearchCriteriaVOGWT, AsyncCallback<List<UserVOGWT>> pCallback);
	public void updateEtudiant(EtudiantVOGWT pEtudiant, AsyncCallback<Object> pCallback);
	public void getEtudiantById(long pEtudiantId, AsyncCallback<EtudiantVOGWT> pCallback);
	public void createEtudiant(EtudiantVOGWT pEtudiantVOGWT, AsyncCallback<Long> pCallback);
	
	public void createProfesseur(ProfesseurVOGWT pProfesseurVOGWT, AsyncCallback<Long> pCallback);
	public void updateProfesseur(ProfesseurVOGWT pProfesseurVOGWT, AsyncCallback<Object> pCallback);
	public void getProfesseurById(long pProfesseurId, AsyncCallback<ProfesseurVOGWT> pCallback);
	
	public void findByNom(String pNom, AsyncCallback<List<UserVOGWT>> pAsyncCallback);
	
	public void findByProprietaire(UserVOGWT pUserVOGWT, AsyncCallback<BoiteAuxLettresVOGWT> pCallback);
	public void envoyer(MessageVOGWT pMessageVOGWT, List<String> pDestinataires, AsyncCallback<Object> pCallback);
	public void repondre(MessageVOGWT pMessageVOGWT, MessageVOGWT pReponse, AsyncCallback<Object> pCallback);
	
	public void updateMessage(MessageVOGWT pMessageVOGWT, AsyncCallback<Object> pCallback);
	
	public void getEmails(SuggestOracle.Request pRequest, AsyncCallback pCallback);
	public void findMessageById(long messsageId, AsyncCallback<MessageVOGWT> pCallback);
}
